<?php

class Adept_Renderer_Button extends Adept_Renderer_Composite    
{
    
    /**
     * @param Adept_Component_Button $component
     */
    public function renderBegin($component) 
    {
        $attributes = array(
            'id' => $component->getId(),
            'type' => 'submit',
            'class' => $component->getClass(),
            'style' => $component->getStyle(),
            'tabindex' => $component->getTabIndex(),
            'disabled' => $component->isDisabled() ? 'true' : null,
            'accesskey' => $component->getAccessKey(),
            'name' => $component->getId(),
            'value' => $component->getTitle(),
        );        
        $component->getWriter()->writeHtmlTag('input', $attributes, true);
    }    
    
}